Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update pydantic to version 2.4 #46

Merged
merged 12 commits into from
Jan 5, 2024
Merged

Update pydantic to version 2.4 #46

merged 12 commits into from
Jan 5, 2024

Conversation

heltluke
Copy link
Contributor

@heltluke heltluke commented Jan 5, 2024

Context:
pydantic 2 comes with new features that one would like to take advantage of in various repos that import from strtawberryfields and the xanadu-cloud-client but is presently unable to due to pydantic being pinned to version 1.8.2 here.

Description of the Change:
Pins pydantic to version 2.4.

Benefits:
Everyone can use the latest features of pydantic.

Possible Drawbacks:
Not likely to be many/any.

Related GitHub Issues:
N/A

@heltluke heltluke marked this pull request as ready for review January 5, 2024 19:31
* Add `pydantic-settings` as a new dependency

* Replace nested `Config` class with `SettingsConfigDict`

* Import Pydantic v2 `ValidationError`

* Fix Pydantic v2 warnings by using `model_dump()`

* Update tests to reflect Pydantic v2 changes

* Replace Python 3.7 support with Python 3.11

* Write Python versions as strings in GHA workflows

* Drop CI support for Python 3.11
Copy link
Collaborator

@Mandrenkov Mandrenkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, looks good! 🥳 Just a few minor tweaks before we can merge.

.github/CHANGELOG.md Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
.github/CHANGELOG.md Outdated Show resolved Hide resolved
.github/CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@Mandrenkov Mandrenkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @heltluke!

.github/CHANGELOG.md Outdated Show resolved Hide resolved
.github/CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Mikhail Andrenkov <Mandrenkov@users.noreply.github.com>
@heltluke heltluke merged commit cae3cd0 into main Jan 5, 2024
8 checks passed
@heltluke heltluke deleted the bump-pydantic branch January 5, 2024 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants